﻿<%@ Page Language="C#" MasterPageFile="~/Template/Edit.master" AutoEventWireup="true"
    CodeFile="NewTrainClass.aspx.cs" Inherits="Page_NewTrainClass" Title="Untitled Page" %>

<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" href="../css/smoothness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />

    <script type="text/javascript" src="../Js/jquery-1.3.2.min-vsdoc.js"></script>

    <script type="text/javascript" src="../Js/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" src="../Js/jquery-ui-1.7.2.custom.min.js"></script>

    <script type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>

    <script type="text/javascript">
        function refreshParent() {
            try {
                window.opener.document.getElementById('ctl00$ListToolBarPlaceHolder$btnRefresh').click();
            }
            catch (e) {
            }
        }
        function SelectApplyOrgan() {
            var returnValue = window.showModalDialog("Function.Web/UserChooser.aspx?SelectType=Department&nocache=" + Math.random() * 10000 + "&ReturnValueFormat=" + encodeURI("<%=tbDeptDisplayName.ClientID %>:DisplayName|<%=tbDeptID.ClientID %>:ID|<%=tbDeptName.ClientID %>:Name"), document, "dialogWidth:800px;dialogHeight:600px;status:yes;resizable:no");
            //var returnValue = window.showModalDialog("OrganList.aspx?nocache=" + Math.random() * 10000 + "&ReturnValueFormat=" + encodeURI("<%=tbxExDeptIDs.ClientID %>:ExcludeID|<%=tbDeptID.ClientID %>:ID|<%=tbDeptDisplayName.ClientID %>:DisplayName|<%=tbDeptName.ClientID %>:Name"), document, "dialogWidth:320px;dialogHeight:500px;status:yes;resizable:no");

        }

    </script>

    <style type="text/css">
        .TextArea01
        {
            height: 70px;
            width: 80%;
        }
        .BigTB
        {
            height: 70px;
            width: 80%;
            background: #F4F9FF;
            overflow-y: visible;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ToolBarContentPlaceHolder" runat="Server">
    <table border="0" cellspacing="0" cellpadding="2">
        <tr>
            <td class="ToolMenuEdit">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                    <asp:LinkButton runat="server" ID="lbtnSave" OnClick="lbtnSave_Click">
                    <span><img src="../Images/Icon/Object/tz-add.gif" /></span><span>保存</span></asp:LinkButton>
                </div>
            </td>
            <td class="Fg" id="tdDeleteFg" runat="server">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenuEdit">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="window.close();">
                    <span>
                        <img src="../Images/Icon/Action/delete.gif" alt="关闭" /></span><span>关闭</span>
                </div>
            </td>
            <td>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FieldContentPlaceHolder" runat="Server">
    <div style="display: none">
        <asp:TextBox runat="server" ID="tbClassID"></asp:TextBox>
        <asp:TextBox runat="server" ID="tbOrderInfo"></asp:TextBox>
        <asp:TextBox runat="server" ID="tbDeptID"></asp:TextBox>
        <asp:TextBox runat="server" ID="tbDeptName"></asp:TextBox>
        <asp:TextBox runat="server" ID="tbxExDeptIDs"></asp:TextBox>
        <div id="dialog" title="增加班次" class="ui-dialog">
            <table id="Table1" border="0" style="height: 50px;" cellspacing="0" cellpadding="0"
                class="FormTable tablefix" width="100%">
                <tr>
                    <td class="FieldName">
                        <span>&nbsp;班次信息：</span>
                    </td>
                    <td class="FieldInput">
                        <input type="text" id="textOrderInfo" class="TextArea01" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="button" onclick="addInfo()" value="增加" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <table id="commandTable" border="0" cellspacing="0" cellpadding="0" class="FormTable tablefix"
        width="100%">
        <tr>
            <td class="FieldName">
                <span>&nbsp;班级名称：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox ID="tbClassName" MaxLength="50" Width="80%" runat="server" CssClass="Textbox01"></asp:TextBox>
                <span style="color: Red;">* </span>
                <asp:RequiredFieldValidator runat="server" ID="rfvClassName" ControlToValidate="tbClassName"
                    ErrorMessage="名称不能为空！"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;培训天数：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox ID="tbTrainDayCount" MaxLength="50" runat="server" CssClass="Textbox01"></asp:TextBox>
                &nbsp;
                <asp:RegularExpressionValidator runat="server" ID="revTrainDayCount" ErrorMessage="请输入正数！"
                    ControlToValidate="tbTrainDayCount" ValidationExpression="([1-9]\d*((.\d+)*))|(0.\d+)"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;培训层级：</span>
            </td>
            <td class="FieldInput">
                <asp:DropDownList ID="ddlTrainLevel" runat="server">
                    <asp:ListItem Text="请选择" Value="请选择" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="国家级" Value="国家级"></asp:ListItem>
                    <asp:ListItem Text="市级" Value="市级"></asp:ListItem>
                    <asp:ListItem Text="区级" Value="区级"></asp:ListItem>
                    <asp:ListItem Text="其他" Value="其他"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;主办单位：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox ID="tbHostUnit" runat="server" MaxLength="200" CssClass="Textbox01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;开课地点：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox ID="tbPlace" runat="server" CssClass="Textbox01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;开设对象：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox ID="tbDeptDisplayName" runat="server" CssClass="Textbox01"></asp:TextBox>
                &nbsp;&nbsp;
                <asp:Button runat="server" ID="Button1" Text="选择" OnClientClick="SelectApplyOrgan()"
                    CssClass="Button01" />
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;开始时间：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox onClick="WdatePicker()" CssClass="Textbox01" ID="tbBeginTime" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;结束时间：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox onClick="WdatePicker()" CssClass="Textbox01" ID="tbEndTime" runat="server"></asp:TextBox>
                &nbsp;<asp:CompareValidator runat="server" ID="compareValidator" ControlToCompare="tbBeginTime"
                    ControlToValidate="tbEndTime" ErrorMessage="结束时间必须晚于开始时间！" Type="Date" Operator="GreaterThanEqual"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;报名截止：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox onClick="WdatePicker()" CssClass="Textbox01" ID="tbApplyEndTime" runat="server"></asp:TextBox>
                &nbsp;<asp:CompareValidator runat="server" ID="compareValidator1" ControlToCompare="tbBeginTime"
                    ControlToValidate="tbApplyEndTime" ErrorMessage="报名时间必须早于开始时间！" Type="Date" Operator="LessThanEqual"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="FieldName">
                <span>&nbsp;课程学分：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox ID="tbCourseScore" runat="server" CssClass="Textbox01"></asp:TextBox>
                &nbsp;<asp:RegularExpressionValidator ID="revScore" runat="server" ControlToValidate="tbCourseScore"
                    ErrorMessage="请输入数字，例如1,2,3...！" ValidationExpression="([1-9]\d*((.\d+)*))|(0.\d+)"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr style="display: none;">
            <td class="FieldName">
                <span>&nbsp;培训时间：</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox onClick="WdatePicker()" CssClass="Textbox01" ID="tbOrderBeginTime" runat="server"></asp:TextBox>
                <select name="dlStartTime" runat="server" id="dlStartTime">
                    <option value="0:00">0:00</option>
                    <option value="0:30">0:30</option>
                    <option value="1:00">1:00</option>
                    <option value="1:30">1:30</option>
                    <option value="2:00">2:00</option>
                    <option value="2:30">2:30</option>
                    <option value="3:00">3:00</option>
                    <option value="3:30">3:30</option>
                    <option value="4:00">4:00</option>
                    <option value="4:30">4:30</option>
                    <option value="5:00">5:00</option>
                    <option value="5:30">5:30</option>
                    <option value="6:00">6:00</option>
                    <option value="6:30">6:30</option>
                    <option value="7:00">7:00</option>
                    <option value="7:30">7:30</option>
                    <option value="8:00" selected="selected">8:00</option>
                    <option value="8:30">8:30</option>
                    <option value="9:00">9:00</option>
                    <option value="9:30">9:30</option>
                    <option value="10:00">10:00</option>
                    <option value="10:30">10:30</option>
                    <option value="11:00">11:00</option>
                    <option value="11:30">11:30</option>
                    <option value="12:00">12:00</option>
                    <option value="12:30">12:30</option>
                    <option value="13:00">13:00</option>
                    <option value="13:30">13:30</option>
                    <option value="14:00">14:00</option>
                    <option value="14:30">14:30</option>
                    <option value="15:00">15:00</option>
                    <option value="15:30">15:30</option>
                    <option value="16:00">16:00</option>
                    <option value="16:30">16:30</option>
                    <option value="17:00">17:00</option>
                    <option value="17:30">17:30</option>
                    <option value="18:00">18:00</option>
                    <option value="18:30">18:30</option>
                    <option value="19:00">19:00</option>
                    <option value="19:30">19:30</option>
                    <option value="20:00">20:00</option>
                    <option value="20:30">20:30</option>
                    <option value="21:00">21:00</option>
                    <option value="21:30">21:30</option>
                    <option value="22:00">22:00</option>
                    <option value="22:30">22:30</option>
                    <option value="23:00">23:00</option>
                    <option value="23:30">23:30</option>
                    <option value="23:59">23:59</option>
                </select>
            </td>
        </tr>
        <tr style="display: none;">
            <td class="FieldName">
                <span>&nbsp;</span>
            </td>
            <td class="FieldInput">
                <asp:TextBox onClick="WdatePicker()" CssClass="Textbox01" ID="tbOrderEndTime" runat="server"></asp:TextBox>
                <select name="dlStartTime" runat="server" id="dlEndTime">
                    <option value="0:00">0:00</option>
                    <option value="0:30">0:30</option>
                    <option value="1:00">1:00</option>
                    <option value="1:30">1:30</option>
                    <option value="2:00">2:00</option>
                    <option value="2:30">2:30</option>
                    <option value="3:00">3:00</option>
                    <option value="3:30">3:30</option>
                    <option value="4:00">4:00</option>
                    <option value="4:30">4:30</option>
                    <option value="5:00">5:00</option>
                    <option value="5:30">5:30</option>
                    <option value="6:00">6:00</option>
                    <option value="6:30">6:30</option>
                    <option value="7:00">7:00</option>
                    <option value="7:30">7:30</option>
                    <option value="8:00">8:00</option>
                    <option value="8:30">8:30</option>
                    <option value="9:00">9:00</option>
                    <option value="9:30">9:30</option>
                    <option value="10:00">10:00</option>
                    <option value="10:30">10:30</option>
                    <option value="11:00">11:00</option>
                    <option value="11:30">11:30</option>
                    <option value="12:00">12:00</option>
                    <option value="12:30">12:30</option>
                    <option value="13:00">13:00</option>
                    <option value="13:30">13:30</option>
                    <option value="14:00">14:00</option>
                    <option value="14:30">14:30</option>
                    <option value="15:00">15:00</option>
                    <option value="15:30">15:30</option>
                    <option value="16:00">16:00</option>
                    <option value="16:30">16:30</option>
                    <option value="17:00" selected="selected">17:00</option>
                    <option value="17:30">17:30</option>
                    <option value="18:00">18:00</option>
                    <option value="18:30">18:30</option>
                    <option value="19:00">19:00</option>
                    <option value="19:30">19:30</option>
                    <option value="20:00">20:00</option>
                    <option value="20:30">20:30</option>
                    <option value="21:00">21:00</option>
                    <option value="21:30">21:30</option>
                    <option value="22:00">22:00</option>
                    <option value="22:30">22:30</option>
                    <option value="23:00">23:00</option>
                    <option value="23:30">23:30</option>
                    <option value="23:59">23:59</option>
                </select>
                &nbsp;&nbsp;
                <asp:Button runat="server" ID="btnAddOrder" Text="增加班次" OnClick="btnAddOrder_Click"
                    CssClass="Button01" />
            </td>
        </tr>
        <tr style="display: none;">
            <td class="FieldName">
                <span>&nbsp;班次详情：</span>
            </td>
            <td>
            </td>
        </tr>
    </table>
    <div class="PageGridBorder" style="display: none;">
        <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
            <wsc:ListHeader ID="lhGender" runat="server" Title="&nbsp;开始时间" Width="80" />
            <wsc:ListHeader ID="lhBirthDay" runat="server" Title="&nbsp;结束时间" Width="80" />
            <wsc:ListHeader ID="lhScore" runat="server" Title="&nbsp;上课时间" Width="80" />
            <wsc:ListHeader ID="lhDepart" runat="server" Title="&nbsp;下课时间" Width="80" />
            <wsc:ListHeader ID="lDelete" runat="server" Title="&nbsp;删除" Width="80" />
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist">
            <asp:Repeater ID="rptOrderInfo" runat="server" OnItemCommand="rptOrderInfo_ItemCommand">
                <ItemTemplate>
                    <tr id="TableRow_<%# Container.ItemIndex%>" style="cursor: hand; text-align: left;"
                        class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                        onclick="ClickChangeClass(this);">
                        <td style="display: none;">
                            <%# DataBinder.Eval(Container.DataItem,"ID") %>
                        </td>
                        <td width="80">
                            <%# DataBinder.Eval(Container.DataItem, "BeginTime")%>
                        </td>
                        <td width="80">
                            <%# DataBinder.Eval(Container.DataItem, "EndTime") %>
                        </td>
                        <td width="80">
                            <%# DataBinder.Eval(Container.DataItem, "BeginHour") %>
                        </td>
                        <td width="80">
                            <%# DataBinder.Eval(Container.DataItem, "EndHour") %>
                        </td>
                        <td width="80">
                            <asp:LinkButton runat="server" ID="lbtnDelete" CommandName="Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID") %>'><img alt="" src="../Images/Icon/Action/delete.gif" /></asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="DescriptionContentPlaceHolder" runat="Server">
    <div class="EditPageForm" style=" padding-top:8px;">
        <table id="Table2" border="0" style=" table-layout: fixed;" cellspacing="0"
            cellpadding="0" class="FormTable tablefix" width="100%">
            <tr style="display: none;">
                <td class="FieldName">
                    <span>&nbsp;课程介绍：</span>
                </td>
                <td class="FieldInput">
                    <asp:TextBox ID="tbCourseInfo" runat="server" TextMode="MultiLine" CssClass="TextArea01"></asp:TextBox>
                </td>
            </tr>
            <tr style="display: none;">
                <td class="FieldName">
                    <span>&nbsp;讲师介绍：</span>
                </td>
                <td class="FieldInput">
                    <asp:TextBox ID="tbLectorInfo" runat="server" TextMode="MultiLine" CssClass="TextArea01"></asp:TextBox>
                </td>
            </tr>
            <tr style="height:80px;">
                <td class="FieldName" style="vertical-align:top;">
                    <span>&nbsp;备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</span>
                </td>
                <td class="FieldInput" style="vertical-align:top;">
                    <asp:TextBox ID="tbComment" runat="server" TextMode="MultiLine" CssClass="TextArea01"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="FieldName">
                    <span>&nbsp;教学计划：</span>
                </td>
                <td class="FieldInput">
                    &nbsp;
                </td>
            </tr>
        </table>
        <div>
            <CE:Editor ID="tbCurriculum" runat="server" Width="90%" FilesPath="~/CuteSoft_Client/CuteEditor/"
                ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/PortalIPS_Mini_Tools.config"
                ThemeType="Office2003_BlueTheme">
            </CE:Editor>
        </div>
    </div>
</asp:Content>
